package com.poulpicious.ethanj.game.entities;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;

public class Player extends LivingEntity {

	private float speed;

	public Player(int x, int y, int w, int h) {
		super(x, y, w, h);
	}
//	
//	@Override
//	public void render(Graphics g) {
//		super.render(g);
//	}
	
	public void update(Input input, int delta) {
		super.update(delta);
		
		if(input.isKeyDown(Input.KEY_LSHIFT)) {
			speed = 0.15f;
		} else {
			speed = 0.1f;
		}
		
		if(input.isKeyDown(Input.KEY_Z)) {
			yDir = (int) (-speed * delta);
		} 
		if(input.isKeyDown(Input.KEY_D)) {
			xDir = (int) (speed * delta);
		} 
		if(input.isKeyDown(Input.KEY_S)) {
			yDir = (int) (speed * delta);
		} 
		if(input.isKeyDown(Input.KEY_Q)) {
			xDir = (int) (-speed * delta);
		}
	}

}
